翻訳と辞書
Words near each other
・ Pearson College (United Kingdom)
・ Pearson College UWC
・ Pearson Commission
・ Pearson Commission on International Development
・ Pearson Cup
・ Pearson distribution
・ Pearson Education
・ Pearson Education Center
・ Pearson Ensign
・ Pearson Ferguson
・ Pearson Field
・ Pearson Field Education Center
・ Pearson Gardens, U.S. Virgin Islands
・ Pearson Hall
・ Pearson Hall (Miami University)
Pearson hashing
・ Pearson in Practice
・ Pearson Island
・ Pearson Isles
・ Pearson Lake (Lennox and Addington County)
・ Pearson Language Tests
・ Pearson Medal of Peace
・ Pearson Mwanza
・ Pearson Park
・ Pearson Peak
・ Pearson Playwrights' Scheme
・ Pearson Plaza
・ Pearson PLC
・ Pearson Point
・ Pearson product-moment correlation coefficient


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Pearson hashing : ウィキペディア英語版
Pearson hashing
Pearson hashing〔(Online PDF file of the CACM paper ).〕 is a hash function designed for fast execution on processors with 8-bit registers. Given an input consisting of any number of bytes, it produces as output a single byte that is strongly dependent〔 on every byte of the input. Its implementation requires only a few instructions, plus a 256-byte lookup table containing a permutation of the values 0 through 255.
This hash function is a CBC-MAC that uses an 8-bit substitution cipher implemented via the substitution table. An 8-bit
cipher has negligible cryptographic security, so the Pearson hash function is not cryptographically strong; but it offers these benefits:
* It is extremely simple.
* It executes quickly on resource-limited processors.
* There is no simple class of inputs for which collisions (identical outputs) are especially likely.
* Given a small, privileged set of inputs (e.g., reserved words for a compiler), the permutation table can be adjusted so that those inputs yield distinct hash values, producing what is called a perfect hash function.
One of its drawbacks when compared with other hashing algorithms designed for 8-bit processors is the suggested 256 byte lookup table, which can be prohibitively large for a small microcontroller with a program memory size on the order of hundreds of bytes. A workaround to this is to use a simple permutation function instead of a table stored in program memory. However, using a too simple function, such as ''T() = 255-i'' partly defeats the usability as a hash function as anagrams will result in the same hash value; using a too complex function, on the other hand, will affect speed negatively.
The algorithm can be described by the following pseudocode, which computes the hash of message ''C'' using the permutation table ''T'':
h := 0
for each c in C loop
index := h xor c
h := T()
end loop
return h
==C implementation to generate 64-bit (16 hex chars) hash==


void Pearson16(const unsigned char
*x, size_t len, char
*hex, size_t hexlen)
snprintf(hex, hexlen, "%02X%02X%02X%02X%02X%02X%02X%02X",
hh(), hh(), hh(), hh(),
hh(), hh(), hh(), hh());
}

For a given string or chunk of data, Pearson's original algorithm produces only an 8 bit byte or integer, 0-255. But the algorithm makes it extremely easy to generate whatever length of hash is desired. The scheme used above is a very straightforward implementation of the algorithm. As Pearson noted: a change to any bit in the string causes his algorithm to create a completely different hash (0-255). In the code above, following every completion of the inner loop, the first byte of the string is incremented by one.
Every time that simple change to the first byte of the data is made, a different Pearson hash, h, is generated. xPear16 builds a 16 hex character hash by concatenating a series of 8-bit Pearson (h) hashes. Instead of producing a value from 0 to 255, it generates a value from 0 to 18,446,744,073,709,551,615.
Pearson's algorithm can be made to generate hashes of any desired length, simply by adding 1 to the first byte of the string, re-computing h for the string, and concatenating the results. Thus the same core logic can be made to generate 32-bit or 128-bit hashes.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Pearson hashing」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.